#include <QtGui>
#include "core/constants.h"
#include "gui/menseimainwindow.h"

#ifdef __WIN32
#include <windows.h>

/*
  Determines whether the host computer is running Windows Vista (Windows 6.0)
  or later.
*/
bool IsVistaOrNewer()
{
    DWORD version = GetVersion();

    // The major version is stored in the lower byte of the dword.
    DWORD majorVersion = LOBYTE(version);

    return majorVersion >= 6;
}
#endif // __WIN32


int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    // If we're on Windows, set the default font to Segoe UI
    // (the UI font for Vista and above)
    // The ifdefs allow us to retain our cross-platformness.
#ifdef __WIN32
    if (IsVistaOrNewer()) {
        QFont font = app.font();
        font.setFamily("Segoe UI");
        app.setFont(font);
    }
#endif // __WIN32

    app.setApplicationName(APPNAME);

    MenseiMainWindow *wnd = new MenseiMainWindow;
    wnd->show();

    return app.exec();
}
